package JDBC;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

import Model.Matiere;

public class Matiere_Modifier{

	public void modifier(Matiere mat){
		try {

			connexionBDD a = new connexionBDD();
			Connection conn=a.connect();
			Statement state = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
			state.executeUpdate("UPDATE matiere SET libelle_mat='"+mat.matiere+"' WHERE id_matiere="+mat.getIdMatiere() );
			
			state.close();
		} 

		catch (Exception e) {
			e.printStackTrace();
		}

	}

}